;; programming configuration
;; from https://github.com/bbatsov/emacs-prelude/

;; keywords
(defun prelude-add-watchwords ()
  (font-lock-add-keywords
   nil '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\)"
          1 font-lock-warning-face prepend))))

(defun prelude-prog-mode-defaults ()
  "Default coding hook, useful with any programming language."
  (flyspell-prog-mode)
  (abbrev-mode +1)
  (which-function-mode +1)
  (prelude-add-watchwords)
  ;; keep the whitespace decent all the time (in this buffer)
  (add-hook 'before-save-hook 'whitespace-cleanup))

(add-hook 'prog-mode-hook 'prelude-prog-mode-defaults)

(provide 'jerry-programming)
